<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title>添加成绩</title>
    <style>
        body {
            font-family: 'Microsoft YaHei', sans-serif;
            background-color: #f5f5f5;
            margin: 0;
            padding: 20px;
        }

        .container {
            max-width: 600px;
            margin: 0 auto;
            background: white;
            padding: 30px;
            border-radius: 8px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }

        h1 {
            color: #2c3e50;
            text-align: center;
            margin-bottom: 30px;
        }

        .form-group {
            margin-bottom: 20px;
        }

        label {
            display: block;
            margin-bottom: 5px;
            color: #2c3e50;
            font-weight: bold;
        }

        input, select {
            width: 100%;
            padding: 8px;
            border: 1px solid #ddd;
            border-radius: 4px;
            font-size: 14px;
        }

        .btn {
            padding: 10px 20px;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-weight: bold;
            width: 100%;
        }

        .btn-primary {
            background-color: #3498db;
            color: white;
        }

        .btn-link {
            display: block;
            text-align: center;
            margin-top: 20px;
            color: #3498db;
            text-decoration: none;
        }
    </style>
</head>
<body>
    <div class="container">
        <h1>添加成绩</h1>
        
        <form action="grade?action=add" method="post">
            <div class="form-group">
                <label for="studentNumber">学号:</label>
                <input type="text" id="studentNumber" name="studentNumber" required>
            </div>

            <div class="form-group">
                <label for="courseName">课程名称:</label>
                <input type="text" id="courseName" name="courseName" required>
            </div>

            <div class="form-group">
                <label for="score">成绩:</label>
                <input type="number" id="score" name="score" step="0.01" min="0" max="100" required>
            </div>

            <div class="form-group">
                <label for="semester">学期:</label>
                <select id="semester" name="semester" required>
                    <option value="2024-春季">2024-春季</option>
                    <option value="2024-秋季">2024-秋季</option>
                </select>
            </div>

            <div class="form-group">
                <label for="examDate">考试日期:</label>
                <input type="date" id="examDate" name="examDate" required>
            </div>

            <button type="submit" class="btn btn-primary">添加成绩</button>
        </form>

        <a href="grade?action=list" class="btn-link">返回成绩列表</a>
    </div>
</body>
</html> 